<?php defined('IN_IA') or exit('Access Denied');?><?php (!empty($this) && $this instanceof WeModuleSite || 1) ? (include $this->template('common/header', TEMPLATE_INCLUDEPATH)) : (include template('common/header', TEMPLATE_INCLUDEPATH));?>
<?php (!empty($this) && $this instanceof WeModuleSite || 1) ? (include $this->template('nav', TEMPLATE_INCLUDEPATH)) : (include template('nav', TEMPLATE_INCLUDEPATH));?>
<form action="" method="post" class="form-horizontal" role="form">
<input type="hidden" value="<?php  echo $basic_config['id'];?>"  name="basic_config_id">
<div class="panel panel-default">
	<div class="panel-heading">基本设置</div>	
	<div class="panel-body">
	<div class="tab-content">
	<div class="tab-pane  active" id="tab_basic">
		<div class="panel panel-default">
			<div class="panel-heading"></div>					
			<div class="panel-body">
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span><span class="label label-danger">公众号名称</span></label>
					<div class="col-sm-9">
						<input type="text"  class="form-control" name="mp_name" placeholder="公众号名称" value="<?php  echo $basic_config['mp_name'];?>">
						<span class="help-block"><span class="label label-success">公众号名称</span></span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">公众号二维码</label>
					<div class="col-sm-9">
						<?php  echo tpl_form_field_image('mp_img', $basic_config['mp_img']);?>
						<span class="help-block">公众号二维码</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">顶部logo图片</label>
					<div class="col-sm-9">
						<?php  echo tpl_form_field_image('top_img', $basic_config['top_img']);?>
						<span class="help-block">顶部logo图片 建议尺寸280x75</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">顶部滚动文字</label>
					<div class="col-sm-9">
						<textarea style="height:200px;" class="form-control" name="top_title" id="quit-tips" cols="70"><?php  echo $basic_config['top_title'];?></textarea>
						<span class="help-block">每条不超过20个字，多条请用#分隔，每10秒更新一次</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span><span class="label label-danger">顶部滚动文字字体大小 px</span></label>
					<div class="col-sm-9">
						<input type="text"  class="form-control" name="top_font_size" placeholder="" value="<?php  echo $basic_config['top_font_size'];?>">
						<span class="help-block"><span class="label label-success">顶部滚动文字字体大小 单位像素</span></span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span><span class="label label-danger">风格选择</span></label>
					<div class="col-sm-9">
						<select name="basic_style" class='form-control' onchange="doit(this.value)">
						 
							 <?php  if(is_array($styles)) { foreach($styles as $key => $row) { ?>
							 <option   value="<?php  echo $key+1?>"  <?php  if($basic_config['basic_style']-$key==1) { ?>selected<?php  } ?>>风格<?php  echo $key+1?></option>
							 <?php  } } ?>
						</select>
						<span class="help-block"><img id="style_pic" style="width:256px;height:170px;margin:8px;" class="img-polaroid img-preview" src="<?php  echo $styles[$basic_config['basic_style']-1]?>"  onerror="this.src='<?php  echo $styles['34'];?>';"></span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">pc背景图片</label>
					<div class="col-sm-9">
						<?php  echo tpl_form_field_image('bg_img', $basic_config['bg_img']);?>
						<span class="help-block">pc背景图片 建议标准 1440 * 828  注意: 上传此背景后风格背景将失效</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">pc背景视频</label>
					<div class="col-sm-9">
						<?php  echo tpl_form_field_video('bg_vedio', $basic_config['bg_vedio']);?>
						<span class="help-block">pc背景视频 格式为:mp4 建议用外链如http:://xxxx.mp4 注:视频背景优先级最高、次之为背景图片、再次之是默认风格</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">底部logo图片</label>
					<div class="col-sm-9">
						<?php  echo tpl_form_field_image('bottom_img', $basic_config['bottom_img']);?>
						<span class="help-block">底部logo图片 建议尺寸165*50</span>
					</div>
				</div>
				<div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">底部参与活动引导词</label>
                    <div class="col-xs-12 col-sm-9">
                        <?php  echo tpl_ueditor('bottom_words',$basic_config['bottom_words'])?>
									<span class="help-block">底部参与活动引导词</span>
                    </div>
                </div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2  control-label">是否开启背景音乐</label>
					<div class="col-sm-9 ">
						<label class="radio-inline">
							<input type="radio" name="bg_music_on" value="0" id="show_time_0" <?php  if($basic_config['bg_music_on'] == '0') { ?>checked="true"<?php  } ?> onclick="show_music1()"> 不开启
						</label>
						<label class="radio-inline">
							<input type="radio" name="bg_music_on" value="1" id="show_time_1"  <?php  if($basic_config['bg_music_on'] == '1') { ?>checked="true"<?php  } ?> onclick="show_music2()">开启
						</label>
					</div>
				</div>
				<div class="form-group show_music" style="<?php  if($basic_config['bg_music_on']==0) { ?>display:none<?php  } ?>">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span><span class="label label-danger">背景音乐链接</span></label>
					<div class="col-sm-9">
						<?php  echo tpl_form_field_audio('bg_music',$basic_config['bg_music'])?>
						<span class="help-block"><span class="label label-success">请填写带有http://的MP3格式的音乐链接</span></span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2  control-label">是否显示星星效果</label>
					<div class="col-sm-9 ">
						<label class="radio-inline">
							<input type="radio" name="show_star" value="0" id="show_time_0" <?php  if($basic_config['show_star'] == '0') { ?>checked="true"<?php  } ?>> 不显示
						</label>
						<label class="radio-inline">
							<input type="radio" name="show_star" value="1" id="show_time_1"  <?php  if($basic_config['show_star'] == '1') { ?>checked="true"<?php  } ?>>显示
						</label>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2  control-label">是否显示落叶效果效果</label>
					<div class="col-sm-9 ">
						<label class="radio-inline">
							<input type="radio" name="show_leaf" value="0" onclick="show_leaf1()" <?php  if($basic_config['show_leaf'] == '0') { ?>checked="true"<?php  } ?>> 不显示
						</label>
						<label class="radio-inline">
							<input type="radio" name="show_leaf" value="1" onclick="show_leaf2()"  <?php  if($basic_config['show_leaf'] == '1') { ?>checked="true"<?php  } ?>>显示
						</label>
					</div>
				</div>
				<div class="form-group leaf_style" style="<?php  if($basic_config['show_leaf']==0) { ?>display:none<?php  } ?>">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span><span class="label label-danger">落叶风格选择</span></label>
					<div class="col-sm-9">
						<select name="leaf_style" class='form-control'>
						 
							 <?php  if(is_array($leaf_styles)) { foreach($leaf_styles as $key => $row) { ?>
							 <option   value="<?php  echo $key?>"  <?php  if($basic_config['leaf_style']==$key) { ?>selected<?php  } ?>><?php  echo $row;?></option>
							 <?php  } } ?>
						</select>
						<span class="help-block">请选择任意一项</span>
					</div>
				</div>
			</div>
		</div>
		<div class="form-group col-sm-12">
			<input type="submit" name="submit" value="提交" class="btn btn-primary col-lg-1" />
			<input type="hidden" name="token" value="<?php  echo $_W['token'];?>" />
		</div>

	</div>
	</div>
	</div>
	</div>
	</form>
	<script>
function show_leaf1(){
	$(".leaf_style").hide();
}
function show_leaf2(){
	$(".leaf_style").show();
}
function show_music1(){
	$(".show_music").hide();
}
function show_music2(){
	$(".show_music").show();
}
  function doit(obj){
	  if(obj.length==1){
		 obj = '0'+obj;
	  }
	  obj = "<?php  echo $_W['siteroot'];?>addons/meepo_xianchang/template/mobile/app/style/icon/0"+obj+'s.jpg';
	  document.getElementById("style_pic").src =obj;
  }



  </script> 
<?php (!empty($this) && $this instanceof WeModuleSite || 1) ? (include $this->template('common/footer', TEMPLATE_INCLUDEPATH)) : (include template('common/footer', TEMPLATE_INCLUDEPATH));?>
